<?php
/**
 * @Author: Xu Liu email:2867557054@qq.com
 * @Date:   2016-12-15 13:31:33
 * @Last Modified by:   Xu Liu
 * @Last Modified time: 2018-01-03 23:04:25
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denid');
}
class table_jamesonread_pdf extends discuz_table
{
    public function __construct()
    {
        $this->_table         = 'jamesonread_pdf';
        $this->_pk            = 'id';
        $this->_pre_cache_key = 'jamesonreadpdf_';
        $this->_cache_ttl     = 300;
        parent::__construct();
    }
    public function fetch_by_bid($book_id)
    {
        return DB::fetch_all('SELECT * FROM %t WHERE book_id=%d ORDER BY ordernum,addtime', array($this->_table, $book_id));
    }
}